<template>
	<view>
		<web-view :src="url" @message="getMsg"></web-view>
	</view>
</template>
<script>
export default{
	data(){
		return {
			url:''
		}
	},
	onLoad(e) {
		var path = e.path;
		this.url = path + "?data="+encodeURIComponent(e.data);
	},
	methods:{
		getMsg:function(res){
			console.log("收到网页消息");
			console.log(res)
			console.log(res.data)
		}
	}
}
</script>
<style>
</style>
